package com.example.group.network.express_plus_app.ui.login;

import androidx.annotation.Nullable;

/**
 * 登陆的返回结果实体类
 * 验证结果：成功（用户详细信息）或错误消息。
 */
class LoginResult {
    @Nullable
    private LoggedInUserView success;//类向UI暴露已验证的用户信息
    @Nullable
    private String error;

    LoginResult(@Nullable String error) {
        this.error = error;
    }

    LoginResult(@Nullable LoggedInUserView success) {
        this.success = success;
    }

    @Nullable
    LoggedInUserView getSuccess() {
        return success;
    }

    @Nullable
    String getError() {
        return error;
    }
}